package com.example.web;

import com.example.daoman.Repair;
import com.example.daoman.User;
import com.example.mapper.UserMapper;
import com.example.service.impl.RepairServiceImpl;
import com.example.utils.GetSession;
import com.example.utils.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

//报修接口 仅仅只有寝室长以及以上权限才可访问
@RestController
@RequestMapping("/repair")
public class RepairInterFace {

    @Autowired
    private RepairServiceImpl repairService;

//    初次进入 身份判别操作 同时查询身份信息

    @RequestMapping("/one")
    public Message getUserOne(){
        return repairService.UserOne();
    }

//    寝室长填写报修申请

    @RequestMapping("/add")
    public Message addRepair(@RequestBody List<Repair> repairList){
        return repairService.InsertRepair(repairList);
    }


}
